#!/bin/sh
#-----------------------------------------------------------------------------
# useful information to have before installing MAE 3.0 Update 1
#-----------------------------------------------------------------------------



#
# Check if root
#
echo "Welcome to the Legato NetWork for Solaris Evaluation Installation."
echo ""
echo ""
if [ "$USER" = "root" ]; then
 while true
 do
  echo "Would you like to install NetWorker, or Quit ? [y/q] \c"

  read ans
  case "$ans" in
        y|Y|yes|YES) exec $COMPANY_DIR/forms/INSTALL.SH;exit 0
            ;;
        N|Q|n|q|No|quit|NO|QUIT|Quit) echo;echo;echo "   cancelling installation of NetWorker"; sleep 5 ; exit 1
            ;;
        * ) echo ; echo ; echo "Please answer with y if you wish to install,"
                   echo "   or q if you wish to quit (stop the install)"
            ;;
  esac
 done
 
else
 while true
 do
  echo "You need to be super user to install this software. \c"
  echo ""
  echo "Would you like to install Networker, or Quit ? [y/q] \c"

  read ans
  case "$ans" in
        y|Y|yes|YES) echo "";echo "Enter super user \c";su root -c '$COMPANY_DIR/forms/INSTALL.SH';exit 0
            ;;
        N|Q|n|q|No|quit|NO|QUIT|Quit) echo;echo;echo "   cancelling installation of NetWorker"; sleep 5 ; exit 1
            ;;
        * ) echo ; echo ; echo "Please answer with y if you wish to install,"
                   echo "   or q if you wish to quit (stop the install)"
            ;;
  esac
 done

 
fi
